package com.grechur.wanandroidcompose.http.service

import com.grechur.wanandroidcompose.bean.BaseData
import com.grechur.wanandroidcompose.bean.article.Article
import com.grechur.wanandroidcompose.bean.article.ArticlesBean
import com.grechur.wanandroidcompose.bean.common.CommonWeb
import retrofit2.http.Field
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface SearchService {

    @GET("/hotkey/json")
    suspend fun getHotKey(): BaseData<List<Article>>

    @FormUrlEncoded
    @POST("/article/query/{index}/json")
    suspend fun search(@Path("index") index: Int?, @Field("k") k:String?):ArticlesBean

    @GET("/friend/json")
    suspend fun friend():BaseData<List<CommonWeb>>
}